<!DOCTYPE html>
<html>
    <head>
        <title>progressbar组件</title>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width">
        <link type="text/css" rel="stylesheet" href="../style/avalon.doc.css">
        <script src="../avalon.js"></script>
        <script src="../highlight/shCore.js"></script>
        <script>
            require(["progressbar/avalon.progressbar"], function() {
                avalon.define("test", function(vm) {
                    vm.progressbar = {
                        onComplete: function() {
                            avalon.log(this)
                            avalon.log('this bar is complete')
                        }
                    }
                    vm.$skipArray = ["progressbar"]
                    var v = 0
                        , timer
                    setTimeout(function() {
                        timer = setInterval(function() {
                            v++
                            if(v > 100) return clearInterval(timer)
                            avalon.vmodels.$aa.value = v
                        }, 50)
                    }, 1000)
                })
                avalon.scan()
            })
        </script>
    </head>
    <body>
<div ms-controller="test">
        <h1>外部设置进度值</h1>
        <div ms-widget="progressbar,$aa">
            
        </div>
        <pre ms-skip class="brush:html;gutter:false;toolbar:false">&lt;!DOCTYPE html&gt;
&lt;html&gt;
    &lt;head&gt;
        &lt;title&gt;progressbar组件&lt;/title&gt;
        &lt;meta charset=&quot;UTF-8&quot;&gt;
        &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width&quot;&gt;
        &lt;script src=&quot;../avalon.js&quot;&gt;&lt;/script&gt;
        
        &lt;script&gt;
            require([&quot;progressbar/avalon.progressbar&quot;], function() {
                avalon.define(&quot;test&quot;, function(vm) {
                    vm.progressbar = {
                        onComplete: function() {
                            avalon.log(this)
                            avalon.log('this bar is complete')
                        }
                    }
                    vm.$skipArray = [&quot;progressbar&quot;]
                    var v = 0
                        , timer
                    setTimeout(function() {
                        timer = setInterval(function() {
                            v++
                            if(v &gt; 100) return clearInterval(timer)
                            avalon.vmodels.$aa.value = v
                        }, 50)
                    }, 1000)
                })
                avalon.scan()
            })
        &lt;/script&gt;
    &lt;/head&gt;
    &lt;body&gt;
&lt;div ms-controller=&quot;test&quot;&gt;
        &lt;h1&gt;外部设置进度值&lt;/h1&gt;
        &lt;div ms-widget=&quot;progressbar,$aa&quot;&gt;
            
        &lt;/div&gt;
        
    &lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;
</pre>
    </div>
</body>
</html>
